package com.project.lx.gettxtfilename.RxBus;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;

import com.project.lx.baseproject.base.RxBus;
import com.project.lx.gettxtfilename.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class RxBus1Activity extends Activity {

    @BindView(R.id.btn_bus_1)
    Button btnBus1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rx_bus1);
        ButterKnife.bind(this);
    }

    @OnClick(R.id.btn_bus_1)
    public void onViewClicked() {
        RxBus.getInstance().send("哈哈");
        startActivity(new Intent(this,RxBus2Activity.class));
        finish();
    }

    @Override
    protected void onDestroy() {
//        RxBus.getInstance().unSubcribe();
        super.onDestroy();
    }
}
